home *** CD-ROM | disk | FTP | other *** search
- property pMyListPosition, pWidth, pHeight, pMyRect, pAngle, pMyState, pMyPoint, pMyImage, pObjLoc, pPrevObjLoc, pBlendLevel, pTargetAngle, pSpinDir, pWheelSoundFlag
- global oPhotosNavCenter, gScreenNum, oPhotosNavNodes, oOrbitNodes, gPhotosNavNum, gMenuNum, gPhotosState, oLetters
-
- on new me, listPosition
- pMyListPosition = listPosition
- case pMyListPosition of
- 1:
- pAngle = 90
- pMyImage = member("photos_button1_off").image.duplicate()
- 2:
- pAngle = 315
- pMyImage = member("photos_button2_off").image.duplicate()
- 3:
- pAngle = 0
- pMyImage = member("photos_button3_off").image.duplicate()
- 4:
- pAngle = 45
- pMyImage = member("photos_button4_off").image.duplicate()
- 5:
- pAngle = 135
- pMyImage = member("photos_button5_off").image.duplicate()
- 6:
- pAngle = 180
- pMyImage = member("photos_button6_off").image.duplicate()
- end case
- pWidth = pMyImage.width
- pHeight = pMyImage.height
- pMyPoint = orbitObj(oPhotosNavCenter.pMyPoint[1], oPhotosNavCenter.pMyPoint[2], pAngle, oPhotosNavCenter.pRadius)
- pMyRect = rect(pMyPoint[1] - (pWidth / 2), pMyPoint[2] - (pHeight / 2), pMyPoint[1] + (pWidth / 2), pMyPoint[2] + (pHeight / 2))
- pObjLoc = pMyRect
- pPrevObjLoc = pObjLoc.duplicate()
- pMyState = #idle
- pBlendLevel = 100
- pTargetAngle = EMPTY
- pSpinDir = 1
- pWheelSoundFlag = 0
- return me
- end
-
- on movePhotosButtons me
- case pMyState of
- #birth:
- pAngle = pAngle + oPhotosNavCenter.pRotateVel
- if pAngle = 360 then
- pAngle = 0
- end if
- if (pAngle = pTargetAngle) and (oPhotosNavCenter.pRadius >= oPhotosNavCenter.pMinRadius) then
- pMyState = #idle
- end if
- pMyPoint = orbitObj(oPhotosNavCenter.pMyPoint[1], oPhotosNavCenter.pMyPoint[2], pAngle, oPhotosNavCenter.pRadius)
- pMyRect = rect(pMyPoint[1] - (pWidth / 2), pMyPoint[2] - (pHeight / 2), pMyPoint[1] + (pWidth / 2), pMyPoint[2] + (pHeight / 2))
- pPrevObjLoc = pObjLoc.duplicate()
- pObjLoc = pMyRect
- #idle:
- spinCheck = 0
- repeat with i = 1 to count(oPhotosNavNodes)
- if oPhotosNavNodes[i].pMyState = #spin then
- spinCheck = 1
- end if
- end repeat
- if spinCheck = 0 then
- sound(5).stop()
- end if
- if (the mouseLoc).inside(pMyRect) and (spinCheck = 0) then
- gPhotosNavNum = pMyListPosition
- gMenuNum = EMPTY
- repeat with i = 1 to count(oPhotosNavNodes)
- oPhotosNavNodes[i].pMyState = #roll
- end repeat
- oPhotosNavCenter.pMyState = #roll
- sound(3).play(member("nav_bio_roll"))
- end if
- #roll:
- if (the mouseLoc).inside(pMyRect) then
- gPhotosNavNum = pMyListPosition
- gMenuNum = EMPTY
- end if
- cursor(280)
- #spin:
- if pAngle = pTargetAngle then
- pMyState = #idle
- gPhotosState = 1
- exit
- end if
- pAngle = pAngle + (oPhotosNavCenter.pRotateVel * pSpinDir)
- if pAngle >= 360 then
- pAngle = 0
- end if
- if pAngle < 0 then
- pAngle = 350
- end if
- pMyPoint = orbitObj(oPhotosNavCenter.pMyPoint[1], oPhotosNavCenter.pMyPoint[2], pAngle, oPhotosNavCenter.pRadius)
- pMyRect = rect(pMyPoint[1] - (pWidth / 2), pMyPoint[2] - (pHeight / 2), pMyPoint[1] + (pWidth / 2), pMyPoint[2] + (pHeight / 2))
- pPrevObjLoc = pObjLoc.duplicate()
- pObjLoc = pMyRect
- #exit:
- pAngle = pAngle + oPhotosNavCenter.pRotateVel
- pMyPoint = orbitObj(oPhotosNavCenter.pMyPoint[1], oPhotosNavCenter.pMyPoint[2], pAngle, oPhotosNavCenter.pRadius)
- pMyRect = rect(pMyPoint[1] - (pWidth / 2), pMyPoint[2] - (pHeight / 2), pMyPoint[1] + (pWidth / 2), pMyPoint[2] + (pHeight / 2))
- pPrevObjLoc = pObjLoc.duplicate()
- pObjLoc = pMyRect
- if pBlendLevel > 0 then
- pBlendLevel = pBlendLevel - 5
- end if
- end case
- end
-